// src/router/index.ts
import { createRouter, createWebHashHistory } from 'vue-router'
import ArticleDetail from '@/components/ArticleDetail.vue'
import HomeView from '@/views/HomeView.vue' // 假设这是你的列表页面

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'Home',
      component: HomeView,
    },
    {
      path: '/detail/:id',
      name: 'Detail',
      component: ArticleDetail,
    },
    {
      path: '/about',
      name: 'about',
      component: () => import('../views/AboutView.vue'),
    },
  ],
})

export default router
